function set_bookmark(sitename, url) {
	window.external.addFavorite(url,sitename);
	return false;
}
function set_home(obj, url) {
	obj.style.behavior='url(#default#homepage)';
	obj.setHomePage(url);
	return false;
}
function load_product(id, cid, page_size, modpath, title_length, orderby0) {
	var load_product_response = function(oXML) {
		$("#" + id).html(oXML);
	}
	cid = parseInt(cid);
	page_size = parseInt(page_size);
	title_length = parseInt(title_length);
	if(isNaN(cid)) cid = 0;
	if(isNaN(page_size)) page_size = 4;
	if(isNaN(title_length)) title_length = 20;
	if(typeof(modpath) != 'string') modpath = 'news';
	if(typeof(orderby0) != 'string') orderby0 = '';


	param = '';
	url = front_ajax + '?action=articlelist&cid=' + cid + 
			'&page_size=' + page_size + 
			'&title_length=' + title_length + 
			'&modpath=' + modpath + 
			'&orderby0=' + orderby0;
	$.post(url, param, load_product_response);
}

function voteres(url) {
	window.open(url, 
		'vote', 
		'height=300, width=400, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
}
function chgfont(n) {
    var content = document.getElementById('article_content');
    if(n == 1) {
        content.style.fontSize = 20;
    } else if(n == 2) {
        content.style.fontSize = 16;
    } else if(n == 3) {
        content.style.fontSize = 12;
    }
}